<template lang="pug">
  .pinjian-wrap
    heads(:type="1" title="品鉴")
    bscroll.cont(ref="list")
      ul.sort-list
        li(v-for="item,index in list" :key="item.id" @click="goDetalis(item.id)") {{item.name}}
          span >
</template>

<script>
import heads from '@/components/head'
import bscroll from '@/components/bscroll'
import listWrap from '@/views/xyh/listDetails'
export default {
  name:"ponjian",
  data(){
    return {
      list:[],
    }
  },
  components:{
    heads,
    bscroll,
    listWrap
  },
  methods:{
    goDetalis(a){
      this.$router.push({
        path:"/listDetails",
        query:{
          id:a
        }
      })
      // this.detailsList = this.list[a].arr;
      // this.detalisFlag = true;
      // this.title = b;
      // console.log(this.detailsList)
    }
  },
  created(){
    this.axios.get('/data/pjlist.json').then(res=>{
      this.list = res.data
    })
  },
  mounted(){
    setTimeout(()=>{
      // console.log(this.$refs.list.scroll)
    },600)
  }
}
</script>

<style scoped lang="scss">
  .pinjian-wrap {
    .cont {
      height: calc( 100vh - 3.71rem - 1.58rem);
      overflow: hidden;
      .sort-list {
        font-size: .24rem;
        li {
          line-height: 1rem;
          padding:0 .23rem;
          &+li {
            border-top:.02rem solid #f4f4f4;
          }
          span {
            float: right;
          }
        }
      }
    }
  }
</style>